CFLAGS = -nostdinc -I ../include
LDFLAGS = --Ttext=0 --oformat=binary
CDEPEND = -M -I ../include

mm.o: memory.o page_fault.o
#	ld $(LDFLAGS) memory.o page_fault.o -o mm.o

%.o: %.c
	gcc $(CFLAGS) -c $< -o $@

%.o: %.s
	as $< -o $@

clean:
	rm *.o -f

depend:
	sed '/\#\#\#Dependency/q' < makefile > temp_make
	(for i in *.c; do gcc $(CDEPEND) $$i; done) >> temp_make
	cp temp_make makefile
	rm temp_make

###Dependency:
memory.o: memory.c ../include/system.h ../include/descriptor.h
